﻿using IM.Easy.Entity.System;
using IM.Easy.Infrastructure.Query;
using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace IM.Easy.SystemServices.Dtos
{
    /// <summary>
    /// 字典类型表
    /// </summary>
    public class DictTypeDto
    {
        public long Id { get; set; }
        /// <summary>
        /// 字典名称
        /// </summary>
        [Required(ErrorMessage = "字典名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 字典类型
        /// </summary>
        [Required(ErrorMessage = "字典类型不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 启用状态
        /// </summary>
        public bool IsActive { get; set; }

        /// <summary>
        /// 是否系统内置
        /// </summary>
        public bool IsSystem { get; set; }

        /// <summary>
        /// 值类型
        /// </summary>
        public ValueDataType DataType { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedAt { get; set; }
    }

    /// <summary>
    /// 字典类型查询DTO
    /// </summary>
    public class DictTypeQueryDto : QueryBase
    {
        /// <summary>
        /// 启用状态
        /// </summary>
        public bool? IsActive { get; set; }
        /// <summary>
        /// 字典名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 关键字
        /// </summary>
        public string Keyword { get; set; }
    }
}
